package com.sunkingdom.qq.demo.common;

import com.sunkingdom.qq.user.service.impl.UserServiceImpl;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@Transactional   //标明此方法需使用事务
@ContextConfiguration(locations="/WEB-INF/dispatcher-servlet.xml")
public class UserControllerTest {
    @Resource
    UserServiceImpl uc;
	@Test
	public void displayUsers(){
        uc.listUsers();
	}
}
